<!DOCTYPE html>
<html>
    
    <head>
        <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
            <link rel="stylesheet" href="css/mui.min.css">
                <link rel="stylesheet" type="text/css" href="css/main.css" />
                <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
                <script src="js/config.js"></script>
                <script src="js/home.js"></script>
                <script src="js/mui.min.js"></script>
                <script src="js/mui.js"></script>
                <script type="text/jscript" src="js/guzhangdeng.js"></script>
                <script charset="UTF-8" src="js/core.js"></script>
                <script charset="UTF-8" src="js/cipher-core.js"></script>
                <script charset="UTF-8" src="js/tripledes.js"></script>
                <script charset="UTF-8" src="js/mode-ecb.js"></script>
                <script type="text/javascript" src="js/zepto.min.js"></script>
                <script type="text/javascript" src="js/spin.min.js"></script>
                <script type="text/javascript" src="js/template-web.js"></script>
                <script type="text/javascript" src="js/mapDetail.js"></script>
                <title></title>
                <style>
                    .myInfo{
                        display: none;
                    }
                .rightcon{
                    float: right;
                    width: 25%;
                    height: 100%;
                }
                #box {
                    overflow-x: hidden;
                    overflow-y: scroll;
                    text-align: center;
                }
                #box::-webkit-scrollbar {
                    display: none;
                }
                input{
                    -webkit-user-select: auto;
                }
                #div1 {
                    padding: 15px;
                }
                </style>
                </head>
    
    <body>
        <div class="cd_nr" id="divselc" hidden="hidden">
            <div class="condition_con" id="div2">
                
            </div>
            <div class="condition_but">
                <p class="condition_but_l float_l" onclick="cancelCondition()">取消</p>
                <p class="condition_but_r float_l" onclick="cpro()">确定</p>
                <div class="clear"></div>
            </div>
        </div>
        <div class="set_wind" hidden="hidden" id="divWall">
            <div class="set_wind_con">
                <div class="set_wind_mid">
                    <p class="set_wind_title">设置风力警报</p>
                    <p class="set_wind_title2" id="windleve"></p>
                    <div class="set_wind_input_con">
                        <input hidden="hidden"  id="proids">
                            <input class="set_wind_in" value="" placeholder="请输入警报提醒风力值" id="wind">
                                </div>
                    <div class="set_wind_but">
                        <p class="set_wind_but_l float_l" onclick="cancelWarning()">取消</p>
                        <p class="set_wind_but_r float_r" onclick="subWarning()">确定</p>
                        <div class="clear"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="spin"></div>
        <div class="my myInfo">
            <div id="box" class="my_con">
                <div class="my_top">
                    <div class="my_portrait_con">
                        <div class="my_portrait">
                            <label>
                                <img id="toux" src="img/my_icon_tou.png">
                                    <input style="opacity: 0;width: 1px;height: 1px;" type="file" accept="image/*" id="head_img_change"/>
                                    </label>
                        </div>
                    </div>
                    <p class="my_name" onclick="updName()">辰东科技</p>
                    <p class="my_ph">13338888888</p>
                </div>
                <div class="my_mid">
                    <div onclick="window.location.href='updMobile.html'" class="my_strip">
                        <img class="float_l my_icon" src="img/wd_sj.png">
                            <p class="my_strip_name float_l">修改手机号</p>
                            <div class="clear"></div>
                            </div>
                    <div onclick="window.location.href='updPsd.html'" class="my_strip">
                        <img class="float_l my_icon" src="img/wd_mm.png">
                            <p class="my_strip_name float_l">修改登录密码</p>
                            <div class="clear"></div>
                            </div>
                    <div onclick="window.location.href='suggestion.html'" class="my_strip">
                        <img class="float_l my_icon" src="img/wd_fk.png">
                            <p class="my_strip_name float_l">意见反馈</p>
                            <div class="clear"></div>
                            </div>
                </div>
                <div class="my_bot">
                    <div onclick="window.location.href='birthday.html'" class="my_strip">
                        <img class="float_l my_icon" src="img/wd_sr.png">
                            <p class="my_strip_name float_l">生日</p>
                            <p id="showBirth" class="my_sr float_l"></p>
                            <div class="clear"></div>
                            </div>
                    <div onclick="window.location.href='likes.html'" class="my_strip">
                        <img class="float_l my_icon" src="img/wd_ah.png">
                            <p class="my_strip_name float_l">爱好</p>
                            <div id="showLike" style="width: 120px;margin-left:10px;float: left;"></div>
                            <div class="clear"></div>
                            </div>
                    
                </div>
            </div>
            <div onclick="showPro()" class="rightcon">
            </div>
        </div>
        <div class="nav_con">
            <div style="width: 10%;height: 100%;float: left;" onclick="showUser()"><img  class="nav_icon float_l" src="img/nav_icon_my@2x.png"></div>
            <div id="companyName" style="width: 80%;height: 100%;float: left;">辰东科技</div>
            <div style="width: 10%;height: 100%;float: left;" onclick="showInfo()"><img class="nav_icon float_r" src="img/nav_icon_notice@2x.png" id="msgImg"></div>
            <div class="clear"></div>
        </div>
        <div class="cd_nr" id="divlist">
            <div class="ser_con">
                <div class="ser_left_con" style="width: 60%;height: 40px;">
                    <div class="ser_left" >
                        <img class="ser_icon float_l" src="img/icon_search@2x.png">
                            <input type="search" style="width: 80%;height: 40px;background-color: #eeeeee;text-align: left;" class="ser_input float_l" placeholder="搜索项目" id="search_input"/>
                            <div class="clear"></div>
                            </div>
                </div>
                <div class="ser_right" style="width: 30%;height: 40px;">
                    <img class="ser_icon float_l" src="img/icon_condition@2x.png">
                        <p class="ser_condition float_l" onclick="conditons()">筛选</p>
                        <div class="clear"></div>
                        </div>
                <div class="ser_right" style="width: 10%;height: 40px;background: white;padding-left: 20px;padding-top: 10px;">
                    <img class="float_r" src="img/xmxq_sx.png" style="width: 18px;cursor: pointer;" onclick="refeshPro()">
                        <div class="clear"></div>
                        </div>
            </div>
            <input id="prov" type="hidden" value="false"/>
            <input id="pronamev" type="hidden" value="false"/>
            <input id="procondiv" type="hidden" value="false"/>
            <div id="div1">
            </div>
            <div class="projectList_con" id="pullrefresh">
                <div></div>
            </div>
        </div>
        <script type="text/javascript">
            window.load = homeInit()
            
            mui.init({
                     keyEventBind: {
                     backbutton: true //开启back按键监听
                     }
                     });
                     
                     var clickNum = 0;
                     mui.back = function(event) {
                         clickNum++;
                         if(clickNum > 1) {
                             plus.runtime.quit();
                         } else {
                             mui.toast("再按一次退出应用");
                         }
                         setTimeout(function() {
                                    clickNum = 0
                                    }, 2000);
                                    return false;
                     }
        
        
        $("#head_img_change").change(function() {
                                     var $file = $(this);
                                     var fileObj = $file[0];
                                     var windowURL = window.URL || window.webkitURL;
                                     var dataURL;
                                     var $img = $("#toux");
                                     if(fileObj && fileObj.files && fileObj.files[0]){
                                     dataURL = windowURL.createObjectURL(fileObj.files[0]);
                                     $img.attr('src',dataURL);
                                     }else{
                                     dataURL = $file.val();
                                     var imgObj = document.getElementById("toux");
                                     // 1、在设置filter属性时，元素必须已经存在在DOM树中，动态创建的Node，也需要在设置属性前加入到DOM中，先设置属性再加入，无效；
                                     // 2、src属性需要像下面的方式添加，上面的两种方式添加，无效；
                                     imgObj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
                                     imgObj.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = dataURL;
                                     }
                                     updImg(fileObj.files[0])
                                     })
                                     var vocabularyName = "";
                                     $("#search_input").on('keypress', function(e) {
                                                           var keycode = e.keyCode;
                                                           //获取搜索框的值
                                                           vocabularyName = $(this).val();
                                                           if (keycode == '13') {
                                                           e.preventDefault();
                                                           //请求搜索接口
                                                           //                    $("#div1").empty()
                                                           pageNum =1;
                                                           isOver = false
                                                           if(vocabularyName == ""){
                                                           flags = 1;
                                                           SelectPosition()
                                                           mui('#pullrefresh').pullRefresh().refresh(true);
                                                           }else{
                                                           flags = 2;
                                                           SelectPosition();
                                                           mui('#pullrefresh').pullRefresh().refresh(true);
                                                           }
                                                           }
                                                           });
                                                           
                                                           $("#div1").on('click','a',function(){
                                                                         var v = $(this).attr("id")
                                                                         setWarning(v);
                                                                         $("#proids").val(v)
                                                                         return false
                                                                         });
                                                                         $("#div1").on('click','div[class="projectList"]',function(){
                                                                                       
                                                                                       var v = $(this).attr("name")
                                                                                       var name = $(this).attr("proName")
                                                                                       ;
                                                                                       window.location.href = 'projectDetail.html';
                                                                                       sessionStorage.setItem("proId",v);
                                                                                       sessionStorage.setItem("ProName",name);
                                                                                       });
            </script>
    </body>
    
</html>
